#ifndef _Manage_Table_DB_H_
#define _Manage_Table_DB_H_

#include "DBAgentServant.h"
#include "ClubProto.h"

using namespace std;
using namespace dbagent;

// 获取俱乐部进行中的桌子数量
tars::Int32 ManageTableGetCount(const DBAgentServantPrx prx, tars::Int64 cId, int &count);

// 获取牌桌信息
tars::Int32 ManageTableList(const DBAgentServantPrx prx, int flag, long uId, int gameType, vector<long> cIdList, vector<Club::ClubTableInfo> &infos);

// 获取牌桌信息
tars::Int32 ManageTableListTwo(const DBAgentServantPrx prx, int gameType, vector<long> cIdList, vector<Club::ClubTableInfo> &infos);

// 获取俱乐部桌子
tars::Int32 ManageTableGetData(const DBAgentServantPrx prx, long uId, string roomKey, int createdTime, Club::ClubTableInfo &info);

// 更新俱乐部桌子信息
tars::Int32 ManageTableModify(const DBAgentServantPrx prx, tars::Int64 cId, std::string roomKey, int createTime, int flag, int startTime, int costTime, int status, int seatNum);

// 更新俱乐部桌子详情信息
tars::Int32 ManageTableModifyDetails(const DBAgentServantPrx prx, tars::Int64 cId, std::string roomKey, int startTime);

// 获取创建且未结束的桌子数量
tars::Int32 ManageTableGetCreatedCount(const DBAgentServantPrx prx, tars::Int64 uId, int &count);

// 修正俱乐部桌子状态(游戏启动后)
tars::Int32 ManageTableRestore(const DBAgentServantPrx prx, const string sGameType);

// 牛仔房结束后更新统计数据
tars::Int32 ManageTableModifyCowBoy(const DBAgentServantPrx prx, tars::Int64 clubId, std::string roomKey, int createTime, int costTime, int playerCount, long buyIn, int buyInCount, long bets, long pays, long fees);

// 获取俱乐部的桌子数量(有联盟联盟桌子数量也算)
tars::Int32 ManageTableCountForUnion(const DBAgentServantPrx prx, long nId, long cId, int &count);

#endif